/* ----------------------------------------------------------------------------
* File: quiz_user_profile_impl.h
*
* Desc: Implementation for user profile
*
* Created: 07/05/2011, by Alexey Korshunov
* ---------------------------------------------------------------------------- */
#ifndef _QUIZ_USER_PROFILE_H_
#define _QUIZ_USER_PROFILE_H_

#include "user_profile.h"
#include "exception.h"
#include <vector>


namespace ModuleManagement
{
	class QuizUserProfileManagerImpl : public QuizCore::UserProfileManager
	{
	public:
		explicit QuizUserProfileManagerImpl(const std::string& FileName)
			throw(Common::Exception);
		~QuizUserProfileManagerImpl();

		// UserProfileManager implementation
		virtual const QuizCore::UserStatisticList& GetUserStatisticInfo() const;
		virtual Common::Error GivePoints(const std::string& User, unsigned int Points);

	private:
		Common::Error WriteUserInfo();

		QuizCore::UserStatisticList m_UserInfo;
		std::string m_FileName;
	};
}

#endif // _QUIZ_USER_PROFILE_H_
